package com.example.actearly_revised;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import android.content.Intent;

public class Calender {


	long startTime,endTime;

	public void addToCalender(String date1, long title, String endTime, long startTime){

		String startDate = "2011-09-01";
		try {
			Date date = new SimpleDateFormat(date1).parse(startDate);
			//startTime=date.getTime();
		}
		catch(Exception e){ }

		Calendar cal = Calendar.getInstance();
		Intent intent = new Intent(Intent.ACTION_EDIT);
		intent.setType("vnd.android.cursor.item/event");
		intent.putExtra("beginTime",startTime);
		intent.putExtra("allDay", true);
		//intent.putExtra("rrule", "FREQ=YEARLY");
		intent.putExtra("endTime", endTime);
		intent.putExtra("title", title);

		//startActivity(intent);
	}
}
